import type { SubjectModulesType, ReaOptionsType, DeviceStatusType } from "./types";

// throttle 延迟时间
export const throttleDelay: number = 2000;

// 科室
export const subjectModules: Array<SubjectModulesType> = [
  {
    label: "all",
    type: "all",
    subject: "ALL",
    pmsClass: ""
  },
  {
    label: "机械科",
    type: "machine",
    subject: "MACHINE",
    pmsClass: "机械科(一期)"
  },
  {
    label: "电科",
    type: "electricity",
    subject: "ELECTRICTITY",
    pmsClass: "电科(一期)"
  },
  {
    label: "水科",
    type: "water",
    subject: "WATER",
    pmsClass: "水科(一期)"
  },
  {
    label: "气化科",
    type: "gas",
    subject: "GAS",
    pmsClass: "气化科(一期)"
  }
];

// 科室（map）
export const subjectModulesMap: Map<string, SubjectModulesType> = new Map([
  [
    "ALL",
    {
      label: "all",
      type: "all",
      subject: "ALL"
    }
  ],
  [
    "WATER",
    {
      label: "水科",
      type: "water",
      subject: "WATER"
    }
  ],
  [
    "ELECTRICTITY",
    {
      label: "电科",
      type: "electricity",
      subject: "ELECTRICTITY"
    }
  ],
  [
    "GAS",
    {
      label: "气化科",
      type: "gas",
      subject: "GAS"
    }
  ],
  [
    "MACHINE",
    {
      label: "机械科",
      type: "machine",
      subject: "MACHINE"
    }
  ]
]);

// area
export const areaOptions: Array<ReaOptionsType> = [
  {
    label: "CVD",
    value: "CVD"
  },
  {
    label: "FUR",
    value: "FUR"
  },
  {
    label: "CMP",
    value: "CMP"
  },
  {
    label: "LITHO",
    value: "LITHO"
  },
  {
    label: "WET",
    value: "WET"
  },
  {
    label: "ETCH",
    value: "ETCH"
  },
  {
    label: "IMP",
    value: "IMP"
  },
  {
    label: "PVD",
    value: "PVD"
  },
  {
    label: "ZUOLL_CVD",
    value: "ZUOLL_CVD"
  }
];

// deviceModule
export const deviceModuleOptions: Array<ReaOptionsType> = [
  {
    label: "PH",
    value: "PH"
  },
  {
    label: "TF",
    value: "TF"
  },
  {
    label: "CMP",
    value: "CMP"
  },
  {
    label: "WET",
    value: "WET"
  },
  {
    label: "DF",
    value: "DF"
  },
  {
    label: "ETCH",
    value: "ETCH"
  }
];

// specialGasOptions
export const specialGasOptions: Array<ReaOptionsType> = [
  {
    label: "SiH4",
    value: "SiH4"
  },
  {
    label: "NO",
    value: "NO"
  },
  {
    label: "CL2",
    value: "CL2"
  },
  {
    label: "SiH2Cl2",
    value: "SiH2Cl2"
  },
  {
    label: "SF6",
    value: "SF6"
  }
];

// atmosphereOptions
export const atmosphereOptions: Array<ReaOptionsType> = [
  {
    label: "CDA",
    value: "CDA"
  },
  {
    label: "GN2",
    value: "GN2"
  },
  {
    label: "PN2",
    value: "PN2"
  },
  {
    label: "PAr",
    value: "PAr"
  },
  {
    label: "PO2",
    value: "PO2"
  },
  {
    label: "PH2",
    value: "PH2"
  },
  {
    label: "PHe",
    value: "PHe"
  }
];

// chemicalsOptions
export const chemicalsOptions: Array<ReaOptionsType> = [
  {
    label: "HF",
    value: "HF"
  },
  {
    label: "H2SO4",
    value: "H2SO4"
  },
  {
    label: "NH4OH",
    value: "NH4OH"
  },
  {
    label: "IPA",
    value: "IPA"
  },
  {
    label: "TMAH",
    value: "TMAH"
  }
];

// waterOptions
export const waterOptions: Array<ReaOptionsType> = [
  {
    label: "UPW/DIW",
    value: "UPW/DIW"
  },
  {
    label: "RW",
    value: "RW"
  },
  {
    label: "Cw",
    value: "Cw"
  },
  {
    label: "Drain",
    value: "Drain"
  },
  {
    label: "Solvent",
    value: "Solvent"
  },
  {
    label: "Acid/Ak",
    value: "Acid/Ak"
  }
];

// machineOptions1 水
export const machineOptions1: Array<ReaOptionsType> = [
  {
    label: "PCW",
    value: "PCW"
  },
  {
    label: "PV",
    value: "PV"
  }
];

// machineOptions2 气
export const machineOptions2: Array<ReaOptionsType> = [
  {
    label: "NH3",
    value: "NH3"
  },
  {
    label: "HCI",
    value: "HCI"
  },
  {
    label: "Solvent",
    value: "Solvent"
  },
  {
    label: "氢气",
    value: "氢气"
  },
  {
    label: "PH3",
    value: "PH3"
  },
  {
    label: "CH3F",
    value: "CH3F"
  },
  {
    label: "CH2F",
    value: "CH2F"
  },
  {
    label: "一般热排气",
    value: "一般热排气"
  }
];

// electricityOptions
export const electricityOptions: Array<ReaOptionsType> = [
  {
    label: "I Line 盘",
    value: "I Line 盘"
  }
];

// 机台状态
export const status: Array<{
  label: string;
  value: string;
  backgroundColor: string;
  color: string;
}> = [
  {
    label: "Unknown",
    value: "unknown",
    backgroundColor: "#DEDFE0",
    color: "#222"
  },
  {
    label: "Run",
    value: "run",
    backgroundColor: "#10B981",
    color: "#fff"
  },
  {
    label: "Alarm",
    value: "alarm",
    backgroundColor: "#EF4444",
    color: "#fff"
  },
  {
    label: "Down",
    value: "down",
    backgroundColor: "#DEDFE0",
    color: "#222"
  },
  {
    label: "Idle",
    value: "idle",
    backgroundColor: "#FFFF00",
    color: "#222"
  },
  {
    label: "PM",
    value: "pm",
    backgroundColor: "#F59E0B",
    color: "#222"
  },
  {
    label: "Hold",
    value: "hold",
    backgroundColor: "#3B82F6",
    color: "#fff"
  },
  {
    label: "Lend",
    value: "lend",
    backgroundColor: "#8573E2",
    color: "#fff"
  }
];

// 机台状态
export const deviceStatus: DeviceStatusType = {
  运行: {
    label: "运行",
    // value: "normal",
    value: "1",

    // color: "#04FF9DFF",
    color: "#34D399",
    dark: {
      color: "#34d399"
    }
  },
  故障: {
    label: "故障",
    // value: "fault",
    value: "2",
    // color: "#FF0844FF",
    color: "#F45252",
    dark: {
      // color: "#F87171"
      color: "#F45252"
    }
  },
  带病: {
    label: "带病",
    // value: "warn",
    value: "3",
    // color: "#FFCA45FF",
    color: "#FECD4B",
    dark: {
      // color: "#FFD360"
      color: "#FECD4B"
    }
  },
  离线: {
    label: "离线",
    // value: "standby",
    value: "4",
    // color: "#909399",
    color: "#D0D0D0",
    dark: {
      // color: "#909399"
      color: "#D0D0D0"
    }
  },
  待机: {
    label: "待机",
    // value: "warn",
    value: "5",
    // color: "#00C2FFFF",
    color: "#2885F7",
    dark: {
      // color: "#4C9CFF"
      color: "#2885F7"
    }
  },
  其他: {
    label: "其他",
    // value: "warn",
    value: "x",
    color: "#13C2C2",
    dark: {
      color: "#13C2C2"
    }
  }
};

export const deviceStatus_ele: DeviceStatusType = {
  正常: {
    label: "正常",
    value: "normal",
    color: "#34d399",
    dark: {
      color: "#04FF9DFF"
    }
  },
  运行: {
    label: "运行",
    value: "normal",
    color: "#19D08D",
    dark: {
      color: "#04FF9D"
    }
  },
  待机: {
    label: "待机",
    value: "standby",
    color: "#2885F7",
    dark: {
      color: "#00C2FF"
    }
  },
  停机: {
    label: "停机",
    value: "standby",
    color: "#4C9CFF",
    dark: {
      color: "#00C2FFFF"
    }
  },
  警告: {
    label: "警告",
    value: "warn",
    color: "#FFD360",
    dark: {
      color: "#FFCA45FF"
    }
  },
  带病: {
    label: "带病",
    value: "warn",
    color: "#FECD4B",
    dark: {
      color: "#FFCA45"
    }
  },
  离线: {
    label: "离线",
    value: "warn",
    color: "#D0D0D0",
    dark: {
      color: "#DEDBDB"
    }
  },
  故障: {
    label: "故障",
    value: "fault",
    color: "#F45252",
    dark: {
      color: "#FF0844"
    }
  },
  其他: {
    label: "其他",
    value: "warn",
    color: "#13C2C2",
    dark: {
      color: "#13C2C2"
    }
  }
};
